/*****************************************************************************/
/*                                                                           */
/* Version:  2.00   Date:  20/09/02   File: main.c                           */
/* Author:  Marco Chiarandini                                                */
/* email: machud@intellektik.informatik.tu-darmstadt.de                      */
/*                                                                           */
/*****************************************************************************/
/*                                                                           */
/*===========================================================================*/

#include <stdio.h>
#include <stdlib.h>
#include "test_sol.h"


long int *solution_vector;
long int **constraints_matrix;
long int NUM_COL;
long int NUM_EDGES;
long int NUM_NODES;
float DENSITY;
char instance_name[FILE_NAME_LEN];
char solution_name[FILE_NAME_LEN];
long int wap_instance = FALSE;

int main( argc, argv )
     int     argc;
     char    *argv[];
{

  long int num_of_viol;

  checkOptions( argc, argv );
  
  num_of_viol = checkConstraints();
  /*num_of_viol = count_violations();*/
  
  
  printf("\ninstance: %s\n",instance_name);
  printf("solution: %s\n",solution_name);
  printf("nodes: %ld\n",NUM_NODES);
  printf("edges: %ld\n",NUM_EDGES);
  printf("density: %.3f\n",DENSITY);
  
  if (num_of_viol == 0)
    {
      printf("+------------------------------------------------+\n");
      printf("| The proposed solution which uses %4ld colors   |\n",NUM_COL);
      printf("| satisfies all the constraints of the instance! |\n");
      printf("+------------------------------------------------+\n");   
    }
  else 
    {
      printf("+---------------------------------------------------------+\n");
      printf("| The proposed solution which uses %4ld colors            |\n",NUM_COL);
      printf("| DOES NOT satisfies all the constraints of the instance! |\n");
      printf("| There are %4ld constraints not satisfied.               |\n",num_of_viol);
      printf("+---------------------------------------------------------+\n");
    }

  return 1;
}

